﻿using He.DAL;
using He.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Project.CustomORM
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                SqlHelper helper = new SqlHelper();
                CompanyModel company = helper.Find<CompanyModel>(1);
                //UserModel userModel = new UserModel
                //{
                //    Name = "hjw",
                //    Account = "111222",
                //    Password = "123456",
                //    Email = "123456",
                //    Mobile = "15099785544",
                //    CreateTime = DateTime.Now
                //};
                //bool bo = helper.Insert<UserModel>(userModel);
                company.Name += "234";
                bool bo2 = helper.Update<CompanyModel>(company);

            }
            catch(Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

        }
    }
}
